#! /bin/sh

# ----------------------------------------------------
# AUTOSTART
# ----------------------------------------------------
pgrep -x sxhkd > /dev/null || sxhkd &

# FIX CURSOR.
xsetroot -cursor_name left_ptr

# RUN NOTIFICATION DAEMON.
dunst --config $HOME/.config/dunst/dunstrc &

# SYSTRAY
# nm-applet &
# volctl &
# volumeicon &
# xbacklight -set 50
# sleep 3 && sbxkb &
# sleep 4 && udiskie --automount --notify --tray &

dunst &
unclutter &
# picom -m &
# picom --backend glx --vsync &
# picom &
numlockx &

# BAR POLYBAR
polybar &
# ~/.config/polybar/./launch.sh --shapes &

# xrdb merge ~/.Xresources

# ----------------------------------------------------
# BSPWM
# ----------------------------------------------------

# bspc monitor -d I II III IV V VI VII VIII IX X
bspc monitor -d '1:' '2:' '3:󰟞' '4:󰍩' '5:󰠮' '6:󰎄' '7:󱉟' '8:󰈫' '9:󰣠'

bspc config border_width         2
bspc config window_gap           4

bspc config split_ratio          0.52
bspc config borderless_monocle   true
bspc config gapless_monocle      true

bspc config focused_border_color     "#de935f"
bspc config normal_border_color      "#1d1f21"
bspc config presel_feedback_color    '#81a2be'

bspc rule -a firefox desktop='^2' follow=on focus=on
bspc rule -a TelegramDesktop desktop='^4' follow=on focus=on
bspc rule -a Element desktop='^4' follow=on focus=on

bspc rule -a calibre desktop='^7' follow=on focus=on

bspc rule -a obs desktop='^8' follow=on focus=on
bspc rule -a kdenlive desktop='^8' follow=on focus=on

bspc rule -a mpv state=floating focus=on follow=on

bspc rule -a obsidian desktop='^5' focus=on follow=on
bspc rule -a qBittorrent desktop='^9' focus=on follow=on

# bspc rule -a Gimp desktop='^8' state=floating follow=on
# bspc rule -a Chromium desktop='^2'
# bspc rule -a mplayer2 state=floating
# bspc rule -a Kupfer.py focus=on
# bspc rule -a Screenkey manage=off

# ----------------------------------------------------
# POST LOADING BSPWM
# ----------------------------------------------------
#
# WALLPAPERS
# feh --bg-fill ~/Wallpapers/archkali.png &
